import os

try:
    import flask
except ImportError:
    os.system('pip install flask')
    import flask

try:
    import pymysql
except ImportError:
    os.system('pip install pymysql')
    import pymysql

from flask import Blueprint, render_template, request

xsslabs = Blueprint('xsslabs', __name__)


# @xsslabs.route('/level1/<xss>')
# def level1(xss):
#     title = request.args.get('title', 'Hacker')
#     print(xss)
#     # return '1'
#     return render_template('xss.html', title=xss)


# @xsslabs.route('/query', methods=['POST', 'GET'])
# def query():
#     return '1'

@xsslabs.route('/level2', methods=['POST', 'GET'])
def query():
    return render_template('xss.html')
